$(function(){
	var path = window.location.href;
   	var id= path.substring(path.indexOf("=")+1);
   	$.ajax({
   		type:"get",
   		url:"/api/meetingroom/getBrandType",
   		data:{"typeId":id},
   		async:true,
   		success:function(data){
   			console.log(data);
   		}
   	});
   	$.ajax({
   		type:"get",
   		url:"/api/meetingroom/searchGoods",
   		async:true,
   		data:{"searchType":id,"sort":0,"page":1,"pageSize":15},
   		success:function(data){
   			var list=data.data
   			console.log(data.data);
   			var str="";
   			for (var i=0;i<list.length;i++) {
   				str += '<li>'+
							'<div class="i-pic limit"  onclick="fun(\''+list[i].goodsId+'\')" >'+
								'<img src="'+list[i].imgUrl+'" />'+										
								'<p class="title fl">'+list[i].goodName+'</p>'+
								'<p class="price fl">'+
									'<b>¥</b>'+
									'<strong>'+list[i].goodPrice+'</strong>'+
								'</p>'+
								'<p class="number fl">'+
									'销量<span>'+list[i].payNum+'</span>'+
								'</p>'+
							'</div>'+
						'</li>';
   			}
   			$(".boxes").html(str);
   			
   		}
   	});
});
function fun(goodsId){
	window.location.href="introduction.html?id="+goodsId;
}